xl: fix vNUMA vdistance parsing
authorWei Liu <wei.liu2@citrix.com>
Mon, 17 Aug 2015 18:56:59 +0000 (19:56 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 21 Aug 2015 07:45:55 +0000 (08:45 +0100)
commit649f0eb7f4b8eb0d5918462e537bc3186f6d52cf
tree791e3f32e2d7d7ec82719783e942bbb97b8d2569
parent743289d0296268fe6bad64531a24d8053afeb062
xl: fix vNUMA vdistance parsing

We should parse the output from splitting function, not the original
string, otherwise the parsed result is wrong.

For example:

vnuma = [ [...,"vdistance=10,20",...],
          [...,"vdistance=20,10",...] ]

Before this change, vdistance from node 0 to all nodes (including
itself) was 10 and vdistance from node 1 to all nodes was 20.

After this change, vdistance from node 0 to itself is 10, to node 1 is
20 and vdistance from node 1 to node 0 is 20, to itself is 10. That's
the correct vdistance settings we expect.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/xl_cmdimpl.c